const api = require("../../../server/Api.js");
const util = require("../../../utils/util.js");
const app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    num: 500,
    name: "",
    idcard: "",
    cardnum: ""
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function(options) {

  },

  input(e) {
    this.setData({
      num: e.detail.value
    })
  },
  input1(e) {
    this.setData({
      name: e.detail.value
    })
  },
  input2(e) {
    this.setData({
      cardnum: e.detail.value
    })
  },
  input3(e) {
    this.setData({
      idcard: e.detail.value
    })
  },
  inputall() {
    this.setData({
      num: 950
    })
  },
  submit() {
    tt.showModal({
      title: '打款电子协议',
      content: '为了保证提现的顺畅，首次提现您需要签署打款电子协议',
      confirmText: "去签署",
      success: function (res) {
        if (res.confirm) {
          tt.redirectTo({
            url: '../signing/form',
          })
        }
      }
    })
    console.log(this.data.num, this.data.name, this.data.cardnum, this.data.idcard)
    // let params = {
    //   "name": this.data.name,
    //   "identity": this.data.idcard,
    //   "mobile": "17689397484",
    //   "bankAccount": this.data.cardnum,
    //   "amount": this.data.num+"",
    //   "remark": "申请提现" + this.data.num +"元"
    // }
    // api.withdrawalApply(params).then(response=>{

    // }).catch(msg=>{

    // })
  }
})